package cn.abyss.admin.enums;

/**
 * Description:
 *
 * @author zhangsj
 * @date Created on 2020/12/15
 */

public enum BaseAdminWebExceptionEnum {
    UNKNOW_ERROR("100000", "未知的错误信息"),
    USER_DEFINED_ERROR("100001", "自定义的错误信息", BaseAdminWebExceptionLevelEnum.PROMPT_ERROR);

    private final String code;
    private final String message;
    private final BaseAdminWebExceptionLevelEnum level;

    private BaseAdminWebExceptionEnum(String code, String message) {
        this(code, message, BaseAdminWebExceptionLevelEnum.INTERNAL_EXCEPTION);
    }

    private BaseAdminWebExceptionEnum(String code, String message, BaseAdminWebExceptionLevelEnum level) {
        this.code = code;
        this.message = message;
        this.level = level;
    }

    public String getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    public BaseAdminWebExceptionLevelEnum getLevel() {
        return this.level;
    }
}
